import React, { Component } from 'react'
import "../css/login.css"

class login extends Component {
  constructor(props) {
    super(props)
    this.state = {}
  }
  render () {
    return (
    <div>
      <div className="dv">
          <div className="left">
 
          </div>
          <div className="login">
              <p className="p1">
                  <span>账号登录</span>
                  <span>|</span>
                  <span>扫码登录</span>
              </p>
             <div className="auto">
                 <p className="p2">
                      <input type="text" ref="name" placeholder=" 邮箱/手机号码/小米ID"/>
                  </p>
                  <p className="p3">
                  <input type="password" ref="pass" placeholder=" 密码"/>
                  </p>
                  <p>
                      <button onClick={()=>{
                          console.log(234);
                          var name=this.refs.name.value;
                          var pass=this.refs.pass.value;
                          if(name.length==0||pass.length==0){
                              alert('用户名或密码不能为空!')
                              return
                          }else{
                              alert('登录成功!')
                              this.props.history.push('./Home')
                          }
                      }}>登录</button>
                  </p>
             </div>
             <p className="p4">手机短信登录/注册</p>
             <p className="p5">立即注册|忘记密码?</p>
             
          </div>
      </div>
    </div>
    )
  }
}

export default login